package com.jinmdz.fmis.api.model.test;

import com.jinmdz.fmis.common.annotation.AnColumn;
import com.jinmdz.fmis.common.annotation.AnTable;
import com.jinmdz.fmis.core.base.BaseBean;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author LiCongLu
 * @date 2020-01-02 14:03
 */
@AnTable(value = "Sheet1123", title = "导出数据Excel表格表头")
public class TextInfo implements Comparable<TextInfo> {

    private int id;

    @AnColumn(value = "名称", index = 0)
    private String username;

    @AnColumn(value = "性别", index = 1)
    private String sex;

    @AnColumn(value = "年龄", index = 2)
    private Integer age;

    @AnColumn(value = "身份证号", index = 3)
    private String idCard;

    @AnColumn(value = "出生日期", pattern = BaseBean.yyyy_MM_dd, index = 4)
    private Date birthday;

    @AnColumn(value = "联系电话", index = 5)
    private String telephone;

    @AnColumn(value = "财产", index = 6)
    private BigDecimal money;

    @AnColumn(value = "数量", index = 7)
    private Double number;

    @AnColumn(value = "总价", index = 8)
    private Float charge;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    public Double getNumber() {
        return number;
    }

    public void setNumber(Double number) {
        this.number = number;
    }

    public Float getCharge() {
        return charge;
    }

    public void setCharge(Float charge) {
        this.charge = charge;
    }

    @Override
    public int compareTo(TextInfo o) {
        if (o == null) {
            return 1;
        }
        return this.username.compareTo(o.username);
    }
}
